package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysDcarbrandClassifyConfigMapper;
import com.ruoyi.system.domain.SysDcarbrandClassifyConfig;
import com.ruoyi.system.service.ISysDcarbrandClassifyConfigService;
import com.ruoyi.common.core.text.Convert;

/**
 * 车辆品牌分类配置Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-09-17
 */
@Service
public class SysDcarbrandClassifyConfigServiceImpl implements ISysDcarbrandClassifyConfigService 
{
    @Autowired
    private SysDcarbrandClassifyConfigMapper sysDcarbrandClassifyConfigMapper;

    /**
     * 查询车辆品牌分类配置
     * 
     * @param id 车辆品牌分类配置ID
     * @return 车辆品牌分类配置
     */
    @Override
    public SysDcarbrandClassifyConfig selectSysDcarbrandClassifyConfigById(Long id)
    {
        return sysDcarbrandClassifyConfigMapper.selectSysDcarbrandClassifyConfigById(id);
    }

    @Override
    public SysDcarbrandClassifyConfig selectSysDcarbrandClassifyConfigByCarBrand(String carBrand) {
        return sysDcarbrandClassifyConfigMapper.selectSysDcarbrandClassifyConfigByCarBrand(carBrand);
    }

    /**
     * 查询车辆品牌分类配置列表
     * 
     * @param sysDcarbrandClassifyConfig 车辆品牌分类配置
     * @return 车辆品牌分类配置
     */
    @Override
    public List<SysDcarbrandClassifyConfig> selectSysDcarbrandClassifyConfigList(SysDcarbrandClassifyConfig sysDcarbrandClassifyConfig)
    {
        return sysDcarbrandClassifyConfigMapper.selectSysDcarbrandClassifyConfigList(sysDcarbrandClassifyConfig);
    }

    /**
     * 新增车辆品牌分类配置
     * 
     * @param sysDcarbrandClassifyConfig 车辆品牌分类配置
     * @return 结果
     */
    @Override
    public int insertSysDcarbrandClassifyConfig(SysDcarbrandClassifyConfig sysDcarbrandClassifyConfig)
    {
        sysDcarbrandClassifyConfig.setCreateTime(DateUtils.getNowDate());
        return sysDcarbrandClassifyConfigMapper.insertSysDcarbrandClassifyConfig(sysDcarbrandClassifyConfig);
    }

    /**
     * 修改车辆品牌分类配置
     * 
     * @param sysDcarbrandClassifyConfig 车辆品牌分类配置
     * @return 结果
     */
    @Override
    public int updateSysDcarbrandClassifyConfig(SysDcarbrandClassifyConfig sysDcarbrandClassifyConfig)
    {
        sysDcarbrandClassifyConfig.setUpdateTime(DateUtils.getNowDate());
        return sysDcarbrandClassifyConfigMapper.updateSysDcarbrandClassifyConfig(sysDcarbrandClassifyConfig);
    }

    /**
     * 删除车辆品牌分类配置对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteSysDcarbrandClassifyConfigByIds(String ids)
    {
        return sysDcarbrandClassifyConfigMapper.deleteSysDcarbrandClassifyConfigByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除车辆品牌分类配置信息
     * 
     * @param id 车辆品牌分类配置ID
     * @return 结果
     */
    public int deleteSysDcarbrandClassifyConfigById(Long id)
    {
        return sysDcarbrandClassifyConfigMapper.deleteSysDcarbrandClassifyConfigById(id);
    }
}
